home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
games
/
biglife3.zoo
/
biglife.doc
next >
Wrap
Text File
|
1993-12-20
|
20KB
|
519 lines
BigLife Version 3.00
====================
A life player for big patterns
Copyright © 1993 Owen Rees
Permission to use, copy and distribute BigLife is granted, provided that
any distribution includes the .PRG .RSC and .DOC files in their original
form. A moderate charge may be made for media, duplication, transmission
etc.
Distributors may use their own judgement about how many patterns to
include.
0) Contents
1) How to use Biglife
2) File formats
3) What is 'Life', further reading, more patterns
4) About the author, acknowledgements, history, future etc.
1) How to use Biglife
It's a GEM program and I have tried to make the menus and dialogs easy
to understand so that, if you want to, you can try it out without
reading any further.
BIGLIFE.RSC must be in the current folder when you run BIGLIFE.PRG, keep
them in the same folder to run from the desktop.
When it is loaded you get a GEM window with all the usual controls, and
a menu bar. Here is a summary of the menu items followed by more
detailed descriptions.
Desk: About life... Version number, data about the current pattern.
Desk accessories, if any.
File: Clear Clear the universe.
Revert Revert to loaded pattern.
Load Xlife... Clear universe and load Xlife file (formats below)
Save Xlife... Save universe as Xlife file (formats below)
Load IMG... Clear universe and load IMG
Save IMG... Save as IMG
Quit For when you have had enough
Actions:Go Run at selected speed until key press
Step Do one generation
Redraw Clear window and redraw pattern
Centre Move centre of window to centre of pattern
Reset counters Zero the generation and time counters
Options:Display... Dialog to set the display style
Speed... Dialog to set the speed limit
Rules... Choose rules for life variants
Edges... Set edges of universe
Show Info Show generation number in title line
About Life...
Tells you:
the version number of the program and the name of the author,
the name of the current pattern, ) editable fields
the 'owner' (creator) of the pattern ) see File format below
the first three comment lines )
the cell count, generation number, the run time, average speed and
average time to compute a generation.
the size and position of the pattern
the size and position of the window (in cells)
the size of the workspace and how much is in use: sizes of current
and previous patterns are given separately.
In Low resolution some of the information is omitted, and none of the
fields are editable (so that you don't accidentally lose half the
information.)
Display dialog:
This lets you select the cell size for display, the cell and background
colours and the function used to draw the display.
There is a selection of cell display sizes in two shapes so that you can
choose reasonably square cells in low, medium or high resolution. This
affects how much of the pattern you can see but not the pattern itself.
The squash factor determines how many life cells are mapped to each
display cell. This allows you to see the overall shape of large
patterns. The number is the length of the side of the square that maps
to each display cell. For example, at squash factor 2, you see twice
the width and twice the height but with less detail.
The colour stuff is really just for fun. The one with the black spot in
the middle is the selected colour. I have only given you eight of the
low res colours - you can only use two at a time anyway.
The VDI and LineA buttons select which function gets called to do the
output. LineA is slightly faster but Atari has declared it obsolete.
For the technically minded, the choice is between the VDI vrt_cpyfm
and the Line A bitblt.
Speed dialog:
This sets a speed limit, measured in generations per second. Max means
as fast as possible and if selected BEFORE you select Go will disable
all the controls until you press a key on the keyboard to stop the
run. With any other speed, the menus remain active. If you select Max
while running, the menus remain active so you have to select Go again
to get full speed.
Note that this is a speed limit rather than a delay between generations.
All speeds above the speed at which the pattern can be computed are
equivalent. The time taken to compute the new generation is subtracted
from the delay.
Rules dialog:
The rules dialog lets you specify the birth and survival rules. Select
which neighbour counts should cause a birth in a dead cell, and which
neighbour counts should cause survival in a live cell. There are
buttons to set the dialog to the standard rules and to the 3-4 rules -
one of the better known variations.
Edges dialog:
The edges dialog lets you specify smaller universes, with either open
or connected edges. All cells beyond an open edge are permanently
dead. A connected edge acts as if it were next to the opposite edge of
the universe. By connecting one or both pairs of edges, the universe
can be made cylindrical or toroidal. Specifying 'no edge' is
equivalent to open edges at -32767 and 32767 except for the way scroll
bars operate. Specifying edges slows things down.
Window controls:
The close box does the same as Quit in the File menu. The title shows
the name of the loaded file and, optionally, the number of generations
since load (or counter reset). The generation counter will be updated
dynamically if there is enough time. The full box, size box and move bar
do the usual resizing and moving.
If edges have been specified, the scroll bars show the size and
position of the window relative to the universe - it can be hard to
find a small pattern in a large universe with edges turned on.
If 'no edge' has been specified, the scroll bars show you the size and
position of the window over an area that includes the pattern plus a
border the height/width of the window, and also includes the window
itself. This may sound a bit odd but try loading the glider, scrolling
the window so that it is in the top left corner (you need the border
to be able to do that) then let it run for about 10 seconds at maximum
speed. The glider crosses the screen and disappears into the distance.
When you stop it, the scroll bars show that you are looking at the
corner of a large area. Scroll the window towards the pattern and the
scroll bars start to get bigger until you get to the pattern again.
If you set a slow enough speed limit, the scroll bars will change
dynamically as the pattern evolves.
Pattern editing:
There is a very primitive and slow pattern editing facility. Pressing
the left mouse button makes the cell under the pointer live, pressing
the right mouse button makes it dead.
2) File Formats
Biglife will read and write the Xlife file format. (Xlife is a freely
available life player for the X Window System.) It will also read and
write IMG format files.
Loading Xlife:
The file consists of a number of pattern sections which are merged to
make the complete pattern. The file, and any additional files from
which patterns are included, are read to form a load script. This
script is then processed to build the pattern. The 'Revert' menu item
rebuilds the pattern from the script - this can take a long time for
some pattern scripts.
Each section starts with a header line that
starts with a '#' followed by a format character that specifies the
format of the section.
Biglife supports the following section formats:
A -- Absolute. The header is followed by lines consisting of a pair of
numbers that specify absolute (x,y) coordinates. For example, a row of
three cells centred on (10,10) would appear as:
#A
9 10
10 10
11 10
R -- Relative. Like absolute but with an offset specified on the
header line. If the offset is omitted it is taken to be 0 0. The same
row of three cells could be specified as:
#R 10 10
-1 0
0 0
1 0
P -- Picture. Each following line down to a line that starts with # or
to the end of the file is interpreted as a scan line of an image
s